import { useEffect, useRef } from "react";

import "./App.css";
import { ThreeSmartCity } from "./lib/three-city";

function App() {
  const threeCityDomRef = useRef<HTMLDivElement>(null);
  useEffect(() => {
    const threeCity = new ThreeSmartCity();
    if (threeCityDomRef.current) {
      threeCityDomRef.current.appendChild(threeCity.renderer.domElement);
      threeCity.animate();
    }
  }, []);

  return <div className="App" ref={threeCityDomRef}></div>;
}

export default App;
